<template>
  <div class="container">
    <div class="top">
      <div class="topLeft contentView">
        <MapGis></MapGis>
      </div>
      <div class="topRight">
        <div class="box" style="height:calc(100% - 46px)">
          <div class="title">
            <div class="dot"></div>
            <span class="titleName">历史告警</span>
          </div>
          <div class="contentView">
            <pillar-charts height="100%"></pillar-charts>
          </div>
        </div>
      </div>
    </div>
    <div class="bottom">
      <div class="box table">
        <div class="title">
          <div class="dot"></div>
          <span class="titleName">在线分布</span>
        </div>
        <div class="contentView" style="overflow-y: auto;">
          <data-table></data-table>
        </div>
      </div>
      <div class="box history">
        <div class="title">
          <div class="dot"></div>
          <span class="titleName">历史告警</span>
        </div>
        <div class="contentView ">
          <LineCharts heught="100%"></LineCharts>
        </div>
      </div>
      <div class="box trend">
        <div class="title">
          <div class="dot"></div>
          <span class="titleName">虫害趋势近5天</span>
        </div>
        <div class="contentView ">
          <pillar-charts></pillar-charts>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import LineCharts from './lineCharts.vue'
import PillarCharts from './pillarCharts.vue'
import DataTable from './table.vue'
import MapGis from '@/components/MapGis'
export default {
  components: {
    LineCharts,
    PillarCharts,
    DataTable,
    MapGis
  }
}
</script>
<style scoped lang="scss">
.container {
  width: 100%;
  height: 100%;
  //width: 1920px;
  //height: 1080px;
  background: rgba(2, 11, 16, 1);
  background-image: linear-gradient(90deg, rgba(14, 27, 43, 1) 1%, rgba(0, 0, 0, 0) 5%),
    linear-gradient(rgba(14, 27, 43, 1) 10%, rgba(0, 0, 0, 0) 10%);
  background-size: 40px 20px;
  padding: 10px;
  box-sizing: border-box;
  .content {
    width: 100%;
    display: flex;
  }
}
.box {
  color: rgba(45, 139, 253, 1);
  .title {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    .dot {
      width: 20px;
      height: 20px;
      background: rgba(255, 232, 142);
      margin-right: 16px;
    }
    .titleName {
      font-size: 26px;
      font-weight: bold;
      color: rgba(45, 139, 253, 1);
    }
  }
  .contentView {
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
  }
}
.top {
  display: flex;
  justify-content: space-between;
  .topLeft {
    width: 1450px;
    height: 640px;
  }
  .topRight {
    width: 430px;
    height: 640px;
  }
}
.bottom {
  margin-top: 20px;
  width: 100%;
  height: 340px;
  display: flex;
  justify-content: space-between;
  .table {
    flex: 3;
  }
  .history {
    flex: 4;
    margin: 0 16px;
  }
  .trend {
    flex: 2;
  }
}
</style>
